[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
GROUP GROUP pattern
GROUP re { action }
GROUP re { action }
GROUP re { action }
GROUP re { action }
or
GROUP re
GROUP re { action }
GROUP re
GROUP re { action }
or
GROUP re
GROUP re { action }
GROUP re
GROUP re
The pattern associated with the GROUP pattern keyword may be a regular
expression, a string constant or a variable. Thus, the following GROUP
patterns are allowable:
GROUP /regular expression constant/
GROUP "string expression constant"
GROUP defined_variable
Strings are treated as regular expressions. Variables are converted to
their string values and treated as regular expressions. The conversion
of variables is done only once when the GROUP patterns are first
utilized to scan an input record.
All consecutive GROUP/action pairs are grouped and the search for the
regular expressions optimized over the GROUP. Each regular expression
of the GROUP may have a separate action associated with it. In this
case the appropriate action is executed if the regular expression is
matched on the current input record. If the action for a regular
expression is not given, then the next action explicitly given is
executed. If no action is given for the last regular expression of a
GROUP, then the default action
{ print ; }
is assigned to it. When one of the regular expressions of the GROUP is
matched, the built-in variable, NG, is set equal to the number of the
expression. The numbering of the expressions in the GROUP starts with
one, 1.
There may be more than one GROUP of regular expression patterns. Any
pattern not preceded with the GROUP keyword will cause a GROUP to be
terminated. The occurrence of the GROUP keyword again will start a new
GROUP and the numbering of the new group starts over at one, 1.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson